import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'highlight.js/styles/default.css' // 代码高亮的样式
import 'amfe-flexible'
import directiveObj from '@/utils/directive'
import Vant, { Lazyload } from 'vant'

import 'vant/lib/index.css'
import 'vant/lib/index.less'

Vue.use(Lazyload, {
  preLoad: 0.9,
  error: 'https://img1.baidu.com/it/u=623384026,4123402594&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=607'// 图片加载视频使用的错误图片
})
Vue.use(Vant)

// 封装中间件函数

// 执行目标对象里install方法并传入Vue类
Vue.use(directiveObj)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
